import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '单据号',
    align:"center",
    dataIndex: 'orderNum'
   },
  //  {
  //   title: '单据明细id',
  //   align:"center",
  //   dataIndex: 'orderLineId'
  //  },
   {
    title: '物料编码',
    align:"center",
    dataIndex: 'goodsCode'
   },
   {
    title: '物料名称',
    align:"center",
    dataIndex: 'goodsName'
   },
   {
    title: '验收数量',
    align:"center",
    dataIndex: 'auditCount'
   },
   {
    title: '上架数量',
    align:"center",
    dataIndex: 'shelfDjCount'
   },
   {
    title: '上架剩余数量',
    align:"center",
    dataIndex: 'shelfSyCount'
   },
   
  //  {
  //   title: '物料类型编码',
  //   align:"center",
  //   dataIndex: 'goodsTypeCode'
  //  },
  //  {
  //   title: '物料质量（不良品，良品等）',
  //   align:"center",
  //   dataIndex: 'qualityLever'
  //  },
   {
    title: '生产日期',
    align:"center",
    dataIndex: 'goodsProDate'
   },
   {
    title: '标签号',
    align:"center",
    dataIndex: 'binCode'
   },
   {
    title: '托盘码',
    align:"center",
    dataIndex: 'trayCode'
   },
   {
    title: '合格标识',
    align:"center",
    dataIndex: 'qcMark'
   },
   {
    title: '单位',
    align:"center",
    dataIndex: 'goodsUnitName'
   },
   {
    title: '批次',
    align:"center",
    dataIndex: 'goodsBatch'
   },
   {
    title: '仓位',
    align:"center",
    dataIndex: 'kwCode'
   },
   {
    title: '上架状态',
    align:"center",
    dataIndex: 'shelfStatus'
   },
   {
    title: '客户',
    align:"center",
    dataIndex: 'cusCode'
   },
   {
    title: '客户名称',
    align:"center",
    dataIndex: 'cusName'
   },
   
  //  {
  //   title: '备注',
  //   align:"center",
  //   dataIndex: 'remark'
  //  },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "单据号",
      field: 'orderNum',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "物料编码",
      field: 'goodsCode',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "客户",
      field: 'cusCode',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "物料名称",
      field: 'goodsName',
      component: 'Input',
      //colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '单据号',
    field: 'orderNum',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  // {
  //   label: '到货通知行项目',
  //   field: 'orderLineId',
  //   component: 'Input',
  // },
  {
    label: '物料编码',
    field: 'goodsCode',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  
  {
    label: '物料名称',
    field: 'goodsName',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  {
    label: '验收数量',
    field: 'auditCount',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  {
    label: '未上架数量',
    field: 'shelfSyCount',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  {
    label: '已上架数量',
    field: 'shelfDjCount',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  {
    label: '此次上架数量',
    field: 'ciAuditCount',
    component: 'Input',
    required:true,
  },
  {
    label: '合格标识',
    field: 'qcMark',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
 
  // {
  //   label: '物料类型编码',
  //   field: 'goodsTypeCode',
  //   component: 'Input',
  // },
  // {
  //   label: '物料质量（不良品，良品等）',
  //   field: 'qualityLever',
  //   component: 'Input',
  // },
  
  {
    label: '标签号',
    field: 'binCode',
    component: 'Input',
    required:true,
  },
  {
    label: '托盘码',
    field: 'trayCode',
    component: 'Input',
    required:true,
  },
  {
    label: '仓位',
    field: 'kwCode',
    component: 'Input',
    required:true,
  },
  {
    label: '生产日期',
    field: 'goodsProDate',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  {
    label: '单位',
    field: 'goodsUnitName',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  {
    label: '批次',
    field: 'goodsBatch',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  
  {
    label: '上架状态',
    field: 'shelfStatus',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  {
    label: '客户',
    field: 'cusCode',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  {
    label: '客户名称',
    field: 'cusName',
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  
  // {
  //   label: '备注',
  //   field: 'remark',
  //   component: 'Input',
  // },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}